// import com.alibaba.druid.sql.ast.*;
// import com.alibaba.druid.sql.ast.expr.*;
// import com.alibaba.druid.sql.ast.statement.*;
// import com.alibaba.druid.sql.dialect.oracle.ast.clause.*;
// import com.alibaba.druid.sql.dialect.oracle.ast.clause.ModelClause.*;
// import com.alibaba.druid.sql.dialect.oracle.ast.stmt.*;
// import com.alibaba.druid.sql.parser.*;
// import com.alibaba.druid.util.FnvHash;

// import java.util.List;
#pragma once
#include "../../../parser/SQLSelectParser.h"

class OracleSelectParser : virtual public SQLSelectParser
{
public:
  OracleSelectParser(string_ptr sql);

  OracleSelectParser(SQLExprParser_ptr exprParser);

  OracleSelectParser(SQLExprParser_ptr exprParser, SQLSelectListCache_ptr selectListCache);

  SQLSelect_ptr select();
  // @Override
  SQLWithSubqueryClause_ptr parseWith();
  SQLSelectQuery_ptr query(SQLObject_ptr parent, BOOL_ptr acceptUnion);
  SQLSelectQuery_ptr queryRest(SQLSelectQuery_ptr selectQuery, BOOL_ptr acceptUnion);
  void parseModelClause(OracleSelectQueryBlock_ptr queryBlock);
  void parseMainModelClause(ModelClause_ptr modelClause);
  void parseModelRulesClause(ModelClause_MainModelClause_ptr mainModel);
  ModelClause_CellAssignment_ptr parseCellAssignment();
  void parseQueryPartitionClause(ModelClause_ModelColumnClause_ptr modelColumnClause);
  void parseModelColumnClause(ModelClause_ReferenceModelClause_ptr referenceModelClause);
  void parseCellReferenceOptions(ModelClause_CellReferenceOption_list_ptr options);
  // @Override
  SQLTableSource_ptr parseTableSource();
  SQLTableSource_ptr parseTableSourcePrimary();
  void parseTableSourceQueryTableExpr(OracleSelectTableReference_ptr tableReference);
  SQLExpr_ptr flashback();
  SQLTableSource_ptr primaryTableSourceRest(SQLTableSource_ptr tableSource);
  SQLTableSource_ptr parseTableSourceRest(OracleSelectTableSource_ptr tableSource);
  void parseInto(OracleSelectQueryBlock_ptr x);
  void parseHints(OracleSelectQueryBlock_ptr queryBlock);
};
